<template>
  <div id="app">
    <keep-alive exclude="projects">
      <router-view v-if="isShow" />
    </keep-alive>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      // 控制router-view的隐藏与展示
      isShow: true,
    };
  },
  // 提供可注入子组件属性
  provide() {
    return {
      reload: this.reload,
    };
  },
  // 定义reload方法
  methods: {
    reload() {
      // 先隐藏
      this.isShow = false;

      // $nextTick() 将回调延迟到下次 DOM 更新循环之后执行
      this.$nextTick(() => {
        this.isShow = true;
      });
    },
  },
};
</script>
<style>
#app {
  /* width: 100%; */
  /* min-width: 1650px; */
  height: 100%;
}
/* title样式 */
.titleInfo {
  margin: 0;
  font-size: 16px;
  /* text-indent: 20px; */
  font-weight: 500;
  color: #1d2023;
  height: 60px;
  line-height: 60px;
  border-bottom: 1px solid #e6e9f0;
  margin-bottom: 20px;
}
/* input的border */
.borderNone > input {
  border: 0 none;
}
.spanToInput {
  color: #606266;
  padding: 0 15px;
}

/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

.clearfix:before,
.clearfix:after {
  /*清楚浮动*/
  content: "";
  display: table;
}

.clearfix:after {
  clear: both;
}

.clearfix {
  *zoom: 1;
  /*IE/7/6*/
}
.el-form-item__content > .el-input--medium > .el-input__inner,
.el-select--medium > .el-input--medium > .el-input__inner,
.el-form-item__content > .el-cascader > .el-input--medium,
.textarea236 > textarea {
  width: 100% !important;
}
.el-input-number--medium {
  width: 100%;
}
.el-date-editor .el-range-separator {
  padding: 0 !important;
}
</style>
